package com.lzy.concertticket.model.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("tb_flow")
public class FlowEntity extends BaseEntity{
    
    /**
     * 主键ID
     */
    @ExcelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 请求的相对资源路径
     */
    @ExcelProperty(value = "请求资源路径")
    private String uri;
    
    /**
     * 用户id
     */
    @ExcelProperty(value = "用户ID")
    private Long userId;
    
    /**
     * 响应状态码
     */
    @ExcelProperty(value = "响应码")
    private Integer responseCode;
    
    /**
     * 请求时间
     */
    @ExcelProperty(value = "请求时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime requestTime;
    
    /**
     * 响应时间
     */
    @ExcelProperty(value = "响应时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime responseTime;
    
    /**
     * 请求处理时长(毫秒)
     */
    @ExcelProperty(value = "请求处理时长(毫秒)")
    private Long duration;
    
    /**
     * 客户端IP
     */
    @ExcelProperty(value = "客户端IP")
    private String clientIp;
    
}
